﻿package com.core
{
    import flash.utils.*;

    public class Control extends Object implements Obinder
    {
        protected var target:Object;
        private static var instances:Dictionary = new Dictionary();

        public function Control(param1:Object)
        {
            this.target = param1;
            this.initView();
            return;
        }// end function

        protected function initView() : void
        {
            return;
        }// end function

        public function update(param1:Obproxy, param2:ProxyChange) : void
        {
            return;
        }// end function

        public static function create(param1:Class, param2:Object) : Control
        {
            var _loc_3:* = new param1(param2);
            ModelProxy.globalproxy.addObserver(_loc_3);
            instances[param1] = _loc_3;
            return _loc_3;
        }// end function

        public static function getControl(param1:Class) : Control
        {
            return instances[param1];
        }// end function

        public static function deleteControl(param1:Class) : void
        {
            delete instances[param1];
            return;
        }// end function

    }
}
